/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.anhanguera.tcc.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Diego
 */
@Entity
@Table(name = "tb_contratada_consorcio")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ContratadaConsorcio.findAll", query = "SELECT c FROM ContratadaConsorcio c"),
    @NamedQuery(name = "ContratadaConsorcio.findByIdContratadaConsorcio", query = "SELECT c FROM ContratadaConsorcio c WHERE c.idContratadaConsorcio = :idContratadaConsorcio")})
public class ContratadaConsorcio implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID_CONTRATADA_CONSORCIO")
    private Integer idContratadaConsorcio;

    public ContratadaConsorcio() {
    }

    public ContratadaConsorcio(Integer idContratadaConsorcio) {
        this.idContratadaConsorcio = idContratadaConsorcio;
    }

    public Integer getIdContratadaConsorcio() {
        return idContratadaConsorcio;
    }

    public void setIdContratadaConsorcio(Integer idContratadaConsorcio) {
        this.idContratadaConsorcio = idContratadaConsorcio;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idContratadaConsorcio != null ? idContratadaConsorcio.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ContratadaConsorcio)) {
            return false;
        }
        ContratadaConsorcio other = (ContratadaConsorcio) object;
        if ((this.idContratadaConsorcio == null && other.idContratadaConsorcio != null) || (this.idContratadaConsorcio != null && !this.idContratadaConsorcio.equals(other.idContratadaConsorcio))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.anhanguera.tcc.model.ContratadaConsorcio[ idContratadaConsorcio=" + idContratadaConsorcio + " ]";
    }

}
